package cn.youyu.fm.dao;

import cn.youyu.fm.domain.Menu;
import cn.youyu.fm.mapper.MenuMapper;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author: mayuanbao
 * @date: 2018-12-27 22:26
 * @description:
 */
@Repository(value = "menuDao")
public class MenuDaoJdbc extends BaseDao implements IMenuDao {
    @Override
    public List<Menu> getMenu(Integer id) {
        return getSqlSession().getMapper(MenuMapper.class).getMenu(id);
    }

    @Override
    public List<Menu> getMenuByRoleId(Integer roleId) {
        return getSqlSession().getMapper(MenuMapper.class).getMenuByRoleId(roleId);
    }
}
